package com.ler.pai.util;

import java.util.Arrays;
import java.util.List;

/**
 * @author lww
 * @date 2020-01-30 19:15
 */
public class AdCodeUtil {

	public static String getCodeByName(String cityName) {
		String[] split = ALL_CITY.split(",");
		List<String> strings = Arrays.asList(split);
		for (String string : strings) {
			if (string.contains(cityName)) {
				String[] split1 = string.split("_");
				return split1[1];
			}
		}
		return null;
	}

	private static final String ALL_CITY = "北京市_110000,杭州市_330100";
}